import * as echarts from 'echarts';

export default defineComponent({
  name: 'echarts',
  props: {
    id: {
      type: String,
      default: 'echarts'
    },
  },
  setup(props) {
    let echart;
    onMounted(() => {
      echart = echarts.init(document.getElementById(props.id) as HTMLElement)
    })
    return () => (<div class='w-full h-full' id={props.id}></div>)
  }
})